/*** Eclipse Class Decompiler plugin, copyright (c) 2012 Chao Chen (cnfree2000@hotmail.com) ***/
package com.feiyue.basic;

import android.content.Context;
import com.feiyue.basic.server.net.NovelInfo;
import com.feiyue.basic.server.parser.Book;
import com.feiyue.basic.server.parser.Category;
import com.info.runninginfo.RunningInfo;
import java.util.List;

public class Test {
	private List<Category> caList;
	private Context context;

	public Test(Context paramContext) {
		this.context = paramContext;
		this.caList = NovelInfo.getCategoryList(paramContext,
				"http://book.yy567.net/bookType");
	}

	private void handleThisCategory(int paramInt) {
		int i = ((Category) this.caList.get(paramInt)).getId();
		List localList;
		for (int j = 0;; j = ((Book) localList.get(-1 + localList.size()))
				.getId()) {
			localList = NovelInfo.getBookList(this.context,
					NovelInfo.getUrl2Booklist(i, j, 2000), i, j, 2000);
			if ((localList == null) || (localList.size() == 0))
				return;
		}
	}

	public void TestBook() {
		int i = ((Category) this.caList.get(-2 + this.caList.size())).getId();
		List localList = NovelInfo.getBookList(this.context,
				NovelInfo.getUrl2Booklist(i, 0, 20), i, 0, 20);
		int j = ((Book) localList.get(-1 + localList.size())).getId();
		NovelInfo.getBookList(this.context,
				NovelInfo.getUrl2Booklist(i, j, 20), i, j, 20);
	}

	public void TestChapterList() {
		int i = this.caList.size();
		for (int j = 0;; ++j) {
			if (j >= i) {
				RunningInfo.outputRunningInfo(this.context, "Over", "Over");
				return;
			}
			handleThisCategory(j);
		}
	}
}